import { request } from './request';

/**
 * 获取商品列表
 */
export function handleGetGoodsList(params) {
    return request({
        url: '/goods',
        method: 'GET',
        params
    })
}

/**
 *  通过商品id删除商品
 */
export function handleDelGoodsById(id) {
    return request({
        url: `/goods/${id}`,
        method: 'DELETE'
    })
}

/**
 *  通过商品id删除商品
 */
export function handleAddGood(data) {
    return request({
        url: `/goods`,
        method: 'POST',
        data
    })
}